#include <iostream>
using namespace std;
#include <unistd.h>
#include <signal.h>
volatile int flag=0;
void handler(int signo)
{
    flag=1;
    cout<<"  signo is: "<<signo<<endl;
}
int main()
{
    signal(2,handler);
    while(!flag);
        cout<<"i am process !! process id:"<<getpid()<<endl;
    return 0;
}